@value gridLine from '../../../../ui/metrics/metrics.css';
@value halfGridLine from '../../../../ui/metrics/metrics.css';
@value SanguoshaFont from '../../../../ui/metrics/metrics.css';

@value wuColor from '../../../../ui/metrics/metrics.css';

.player {
    display: flex;
    position: relative;
}
.playerCard {
    position: relative;
    height: 230px;
    width: 170px;
    display: flex;
    justify-content: space-between;
}

.highlightBorder {
    height: 216px;
    width: 100%;
    left: 0;
    z-index: -2;
    transition: box-shadow 0.15s;
    position: absolute;
    bottom: 0;
    border-radius: calc(gridLine * 1.5);
}
.selected {
    box-shadow: 0px 0px 10px 5px red;
}
.highlighted:not(.selected) {
    box-shadow: 0px 0px 10px 5px wuColor;
}

.dead {
    filter: grayscale(100%);
}

.judgeIcons {
    position: absolute;
    bottom: -10px;
    right: gridLine;
    display: flex;
}

.playerRoleCard {
    position: absolute;
    z-index: -1;
    flex: auto;
    align-self: center;
}

.playerImage {
    flex: auto;
    position: absolute;
    width: calc(100% + 34px);
    margin-left: -17px;
    height: 100%;
    z-index: -2;
}

.playerImage.playerUnknownImage {
    width: 100%;
    margin: 0;
}

.playerSeats {
    position: absolute;
    bottom: calc(-3 * gridLine);
    margin: 0;
    color: white;
    text-shadow: 0px 0px 3px rgba(50, 50, 50, 0.87), 0px 0px 5px rgba(50, 50, 50, 0.87),
        0px 0px 7px rgba(50, 50, 50, 0.87);
    z-index: -1;
    width: 100%;
    font-family: SanguoshaFont;
    font-size: 24px;
    text-align: center;
}

.playerCharacter {
    position: absolute;
    left: calc(gridLine * -1.5);
    z-index: 2;
}

.playerHp {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 24px;
    justify-self: flex-end;
}
.playerRole {
    right: 0;
    top: 0;
}
.tooltip {
    display: flex;
    flex-wrap: wrap;
    width: calc(gridLine * 40);
}
.status {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.status,
.waiting {
    align-self: center;
    flex: auto;
    text-align: center;
}
.disabled:not(.dead) {
    filter: brightness(0.5);
}
.playerName {
    position: absolute;
    width: 100%;
    text-align: center;
    margin-top: 16px;
    text-shadow: 0px 0px 2px rgb(255, 255, 255), 0px 0px 2px rgb(255, 255, 255), 0px 0px 2px rgb(255, 255, 255);
    font-weight: 550;
    font-size: 14px;
    height: calc(gridLine * 3);
    line-height: calc(gridLine * 3);
    color: rgb(130, 54, 0);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    padding: 0 gridLine;
}
.playerName.aligned {
    padding: 0 calc(gridLine * 4);
}
.playerEquips {
    height: calc(12 * 8px);
    display: flex;
    flex-direction: column;
    align-self: flex-end;
    width: 170px;
    position: absolute;
    left: 0;
    align-items: center;
}

.playerEquip {
    height: 20%;
    justify-content: center;
    position: absolute;
    max-width: calc(gridLine * 15);
}

.handCardsNumberBg {
    position: absolute;
    text-align: center;
    z-index: 2;
    margin-top: gridLine;
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(gridLine * 5);
    left: calc(gridLine * -2.5);
    bottom: 0;
}
.handCardsNumberBgImage {
    width: 100%;
}
.handCardsNumber {
    z-index: 100;
    position: absolute;
    font-size: 16px;
    font-weight: 550;
    color: white;
    text-shadow: 0px 0px 2px black, 0px 0px 2px black, 0px 0px 4px black, 0px 0px 4px black;
}
.clickableHandcards {
    cursor: pointer;
}

.playerPhaseBadge {
    position: absolute;
    bottom: calc(gridLine * -2);
    height: calc(gridLine * 3.5);
}

.weapon {
    top: 20%;
}
.armor {
    top: 40%;
}
.defenseRide {
    top: 60%;
}
.offenseRide {
    top: 80%;
}
.precious {
    top: 0;
}

.skillInfo {
    display: flex;
    flex-direction: column;
}
.skillItem {
    display: flex;
    margin-bottom: calc(gridLine * 2);
}
.skillName {
    flex: auto;
    margin-right: gridLine;
    min-width: calc(gridLine * 6);
    font-weight: 600;
    font-size: calc(gridLine * 2);
    color: #fbd000;
}

.playerTags {
    position: absolute;
    top: calc(gridLine * 5);
    left: calc(gridLine * 3);
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.skillTags,
.outsideArea {
    display: flex;
}

.skillTags {
    margin-bottom: 4px;
}

.skillTag {
    background-color: grey;
    margin: 0px 4px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    padding: 0 4px;
}
.clickableSkillTag {
    cursor: pointer;
}

.chain {
    position: absolute;
    align-self: center;
    width: 100%;
}

.drunk {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: calc(100% - calc(gridLine * 2));
    background-color: #cc1b0d;
    opacity: 0.3;
    z-index: -1;
}

.playBar {
    position: absolute;
    bottom: calc(8px * -2.5);
    width: 100%;
}

.incomingMessage {
    width: 100%;
}

.playerStatus {
    position: absolute;
    right: 0;
    top: calc(gridLine * 8);
    background-color: #424242;
    color: white;
    font-weight: 600;
}

.marks {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: calc(gridLine * 2);
    height: 100%;
    width: calc(gridLine * 4);
}
